package com.demo.oauth2jFinalShiroClient.config;

import com.demo.oauth2jFinalShiroClient.handle.SessionIdHandler;
import com.demo.oauth2jFinalShiroClient.web.LoginController;
import com.demo.oauth2jFinalShiroClient.web.NeteaseResourceController;
import com.demo.oauth2jFinalShiroClient.web.OAuth2ClientController;
import com.demo.oauth2jFinalShiroClient.web.ResourceController;
import com.jfinal.config.Constants;
import com.jfinal.config.Handlers;
import com.jfinal.config.Interceptors;
import com.jfinal.config.JFinalConfig;
import com.jfinal.config.Plugins;
import com.jfinal.config.Routes;
import com.jfinal.render.ViewType;

public class DemoConfig extends JFinalConfig {

	@Override
	public void configConstant(Constants me) {
		me.setDevMode(true);
		me.setViewType(ViewType.JSP);
		me.setBaseViewPath("jsp");
	}

	@Override
	public void configHandler(Handlers me) {
		me.add(new SessionIdHandler());
	}

	@Override
	public void configInterceptor(Interceptors me) {
		// TODO Auto-generated method stub

	}

	@Override
	public void configPlugin(Plugins me) {
		// TODO Auto-generated method stub

	}

	@Override
	public void configRoute(Routes me) {
		me.add("/login", LoginController.class);
		me.add("/oAuth2", OAuth2ClientController.class);
		me.add("/res", ResourceController.class);
		me.add("/netease", NeteaseResourceController.class);
	}

}
